PARAM_ANIMATOR

Description

With this element, it is possible to create a wrapper to a parameter object that animates this parameter over time, based on the wrapper value changes. It is an easy way to create animations in a user interface: the wrapper continuously forwards the changes made to its value with a delay that can be specified.

The PARAM_ANIMATOR wrapper has the exact same characteristics (type, min/max/default values, unit...) as the parameter object that it wraps.

Common Attributes

See common elements attributes.

Specific Attributes
Name Value Type Default Value Description Comment V. Exp.

param_id

valid parameter identifier

Empty.

Parameter to wrap fro animation.


1.7

1.7

duration_ms

Any positive integer value

250

Duration of the animation.


1.7

1.7

refresh_time_ms

Any positive integer value

50

interval between two updates in the animation.

You should increase this value if you are concerned with display performance issues, and decrease it for smoother animations.

1.7

1.7

enabled

boolean

false

enable or disable the animation.

When animation is disabled, there is no more delay between wrapper and destination paramter changes: the animation is cancelled but value changes are forwarded to the wrapped parameter.

1.7

1.7

persistent

boolean

false

makes the value of the animator persistent.

When a parameter is animated, you usually want to make the animator persistent instead of the parameter itself. This way all undo/redo operations are animated as well, and there is no risk of overriding the saved value because an animation is being triggered while loading.

1.7

No

Examples

The following example creates a simple skin with a button that controls the fade in/fade out animation of a text element:

<?xml version="1.0" encoding="utf-8" ?>
<SKIN author="Blue Cat Audio" name="Default" background_color="#000000" repeat="true" text_color="#ffffff" font_size="28" font_face="Arial">
  <COLUMN>
    <TEXT id="dummy_text" width="200" value="Hello World"/>
    <PARAM_ANIMATOR id="visibility" persistent="true" param_id="dummy_text.opacity"/>
    <IMAGE_PARAM_BUTTON image="button.bmp" param_id="visibility"/>
  </COLUMN>
</SKIN>